<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$temp_array = array(
	'inconsistency' => 'Inconsistency between the holy word and the beliefs',
	'Jehovah'       => 'Jehovah&apos;s name',
	'witnesses'     => 'The witnesses',
	'conceited'     => 'Conceited',#
	'possible'      => 'Is it possible to follow his orders?',
	'straw_man'     => 'Straw man',#
	'offerings'     => 'Offerings',#
	'plates'         => 'Various plates',
	'inbreeding'    => 'Inbreeding',
	'virginity'     => 'Visible virginity?',
	'redemption'    => 'Redemption',#
	'hell'          => 'Hell',#
	'blame'         => 'Passing blame',
	'logic'         => 'Bad logic',
	'inheritance'   => 'Inheritance of blame',
	'procreation'   => 'Procreation',
	'racism'        => 'Racism',
	'one'           => 'One entity',#
	'versus'        => 'Us-versus-them mentality',
	'purification'  => 'Purification',
	'diet'          => 'Effects of diet on morality',
	'signs'         => 'Signs',
	'ghost'         => 'Holy Ghost',#
	'poligamy'      => 'Poligamy',
	'limitations'   => 'Limitations of Jehovah',
	'anything'      => 'Ask for anything you want',
	'life'          => 'Debt for life',
);

$xhtml = array(
	'<{title}>' => 'The Book of Mormon',
	'<{subtitle}>' => 'An account written by the hand of Mormon, upon plates taken from the plates of Nephi.',
	'<{copyright year}>' => '2019',
	'<{body}>' => <<<END
<p>
	Wikisource seems to think the <a href="https://en.wikisource.org/wiki/Book_of_Mormon_%281981%29">1981 edition of the Book of Mormon</a> is in the public domain on account of being published before 1924.
	Read that over for a bit.
	Yeah, that doesn&apos;t make any sense to me, either.
	The copy on Wikisource seems to lack some of the material that was added in the 1981 edition though, and even the chapter summaries from the 1920 edition, so it&apos;s likely that the only text included is in fact that old.
	That begs the question of why it&apos;s labelled as the 1981 edition though; the 1920 addition had the chapter and verse numbers, so it&apos;s not that.
	In any case, I trust Wikisource knows what they&apos;re talking about, so I&apos;ll be quoting passages from that version of the Book of Mormon.
	It is also my understanding that the only changes this edition made to the verses were to <a href="https://emp.byui.edu/SATTERFIELDB/Papers/BMPublicationHistory.htm">correct errors in the copy given to the printer</a>, meaning that this version of the verses likely existed at the time of the 1920 edition, but the copy given to the printer just wasn&apos;t quite right.
	I do not intend to commit copyright infringement.
	If you know this version of the verses to be in fact copyrighted, please let me know and I will make the adjustments (that is, I&apos;ll find the corresponding verse in an older version and use that instead).
	I don&apos;t know how to track down information on the copyrights, and I couldn&apos;t find the 1920 edition of the book that I intended to use.
</p>
<p>
	Anyway, without further ado ...
</p>
<nav>
	<ul>

END
);

foreach($temp_array as $key => $value):
	$xhtml['<{body}>'] .= <<<END
		<li>
			<a href="#$key">$value</a>
		</li>

END;
endforeach;

$xhtml['<{body}>'] .= <<<END
	</ul>
</nav>
END;

foreach($temp_array as $key => $value):
	$xhtml['<{body}>'] .= <<<END
<section id="$key">
	<h2>$value</h2>

END;

	$xhtml['<{body}>'] .= file_get_contents(__DIR__."/../../../../religion project/$key.xhtml");

	$xhtml['<{body}>'] .= <<<END
</section>

END;
endforeach;
